//
//  LTLoginUserModel.m
//  LTIM
//
//  Created by 俊松何 on 2017/3/31.
//  Copyright © 2017年 俊松何. All rights reserved.
//

#import "LTLoginUserModel.h"
#import "MJExtension.h"
#import "LTUser.h"
@implementation LTLoginUserModel


//@property(nonatomic,  copy)   NSString    *userId;
//@property(nonatomic,  copy)   NSString    *name;
//@property(nonatomic,  copy)   NSString    *avatar;
//@property(nonatomic,  copy)   NSString    *remark;
//@property(nonatomic,  copy)   NSString    *namePy;
//@property(nonatomic,  copy)   NSString    *remarkPy;
//@property(nonatomic,assign)   LTUserType   type;
//@property(nonatomic,  copy)   NSString    *phone

-(NSData*)requestSendData {
    
    NSDictionary *dict = @{@"userId":_user.userId,
                           @"name":_user.name,
                           };
    NSData *data = [dict mj_JSONData];
    return data;
    
}

//解包 回包
-(int)onPostDecode:(NSData*)responseData
{
    
    NSString *messageJson = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
    NSLog(@"%@",messageJson);
    
    if(self.LoginComplentBlock)
    {
        self.LoginComplentBlock(self.user,nil);
    }
    return 0;
}
//任务结束。
-(int)onTaskEnd:(uint32_t)tid errType:(uint32_t)errtype errCode:(uint32_t)errcode
{
    return 0;
}


@end
